<?php defined('RUN_KATANA') or die('Restricted access'); ?>
<?php 
if(is_object($ad))
{
?>
<article class="prospect" itemscope itemtype="http://schema.org/Product">
<!--[if lt IE 9]><div class="prospect"><![endif]-->
	<div class="prospect-padding row-fluid row">
		<div class="prospect-image <?php if($deviceType=='phone'){ echo 'w3'; } else { ?> span2 col-md-3 <?php } ?>"><?php require($adc->getViewPath().'elements/Image.php'); ?></div>
		<div class="info <?php if($deviceType=='phone'){ echo 'pull-left'; } else { ?> span10 col-md-9 <?php } ?>">
			<?php require($adc->getViewPath().'elements/Title.php'); ?>
			<table>
			<?php if($ad->getCatId() > 0): ?>
			<tr>
				<td class="left <?php echo $adc->getSetting('AttributeClass'); ?>"><?php echo ucfirst($txt->getWord('category')); ?>&nbsp;&nbsp;</td>
				<td class="left <?php echo $adc->getSetting('AttributeValClass'); ?>"><a href="/adcat/<?php echo $ad->getCatId(); ?>/"><?php echo $txt->truncate(ucfirst($ad->getCatTitle()), 26, '', '', ''); ?></a></td>
			</tr>
			<?php endif; ?>
			<?php if($ad->getBrandId() > 0): ?>
			<tr>
				<td class="left <?php echo $adc->getSetting('AttributeClass'); ?>">
				<?php 
				if($txt->getWord('brand_'.$ad->getTypeId()) != 'brand_'.$ad->getTypeId())
				{ echo ucfirst($txt->getWord('brand_'.$ad->getTypeId())); }
				else
				{ echo ucfirst($txt->getWord('brand')); }
				?>
				</td>
				<td class="left <?php echo $adc->getSetting('AttributeValClass'); ?>"><a href="/adcat/<?php echo $ad->getCatId(); ?>/adbrand/<?php echo $ad->getBrandId(); ?>/"><?php echo $ad->getBrandTitle(); ?></a></td>
			</tr>
			<?php endif; ?>
            <?php if(($ad->getDisplayModel() > 0) && ($ad->getModTitle() != '')): ?>
			<tr>
				<td class="left <?php echo $adc->getSetting('AttributeClass'); ?>"><?php echo ucfirst($txt->getWord('model')); ?></td>
				<td  class="left <?php echo $adc->getSetting('AttributeValClass'); ?>"><?php echo $ad->getModTitle(); ?></td>
			</tr>
			<?php endif; ?>
			<?php if(($ad->getDisplayModel() > 0) && ($ad->getModel() != '')): ?>
			<tr>
				<td class="left <?php echo $adc->getSetting('AttributeClass'); ?>"><?php echo ucfirst($txt->getWord('model')); ?></td>
				<td class="left <?php echo $adc->getSetting('AttributeValClass'); ?>"><?php echo $ad->getModel(); ?></td>
			</tr>
			<?php endif; ?>
			<?php if(($ad->getDisplayYear() > 0) && ($ad->getYear() > 0)): ?>
			<tr>
				<td class="left <?php echo $adc->getSetting('AttributeClass'); ?>"><?php echo ucfirst($txt->getWord('Year_number')); ?></td>
				<td class="left <?php echo $adc->getSetting('AttributeValClass'); ?>"><?php echo $ad->getYear(); ?>&nbsp;&nbsp;
                 <?php 
				if($ad->getIsCompleted() > 0)
                { 
				?>
                    <div class="sold float-left">
                    <p class="float-left"><?php echo ucfirst($ad->getIsBoughtText()); ?>&nbsp;&nbsp;</p>
                    <img src="<?php echo SYSICONS_URL ?>ok_16.png" width="16" height="16" alt="<?php echo ucfirst($ad->getIsBoughtText()); ?>" title="<?php echo ucfirst($ad->getIsBoughtText()); ?>" />
                    </div>
                <?php
                }
				?>
                </td>
			</tr>
            <?php elseif($ad->getIsCompleted() > 0): ?>
            <tr>
				<td class="left <?php echo $adc->getSetting('AttributeClass'); ?>"></td>
				<td class="left <?php echo $adc->getSetting('AttributeValClass'); ?>">
                    <div class="sold float-left">
                    <p class="float-left"><?php echo ucfirst($ad->getIsBoughtText()); ?>&nbsp;&nbsp;</p>
                    <img src="<?php echo SYSICONS_URL ?>ok_16.png" width="16" height="16" alt="<?php echo ucfirst($ad->getIsBoughtText()); ?>" title="<?php echo ucfirst($ad->getIsBoughtText()); ?>" />
                    </div>
                </td>
			</tr>
			<?php endif; ?>
			<?php if($ad->getTypeId() == 5): ?>
				<?php if($ad->getWeight() > 0):  ?>
				<tr>
					<td class="left <?php echo $adc->getSetting('AttributeClass'); ?>">
					Kg&nbsp;<span class="right"><?php 
					if($ad->getIsByying() == 0)
					{ echo $txt->getWord('max'); }
					else
					{ echo ucfirst($txt->getWord('payload')); }
					?>
					</td>
					<td colspan="2" class="left <?php echo $adc->getSetting('AttributeValClass'); ?>"><?php echo number_format($ad->getWeight(), 0, ',', ' '); ?></td>
				</tr>
				<?php endif; ?>
			<?php endif; ?>
			</table>
			<?php require($adc->getViewPath().'elements/Description.php'); ?>
		</div><div class="clear"></div>
	</div>
<!--[if lt IE 9]></div><![endif]-->
</article>
<?php
}
?>